//
//  UIBarButton+Extention.swift
//  WB
//
//  Created by KenLiang on 16/4/7.
//  Copyright © 2016年 KenLiang. All rights reserved.
//

import UIKit

extension UIBarButtonItem  {
    convenience init(imageName : String) {
         let btn = UIButton()
        
        btn.setImage(UIImage(named: imageName), forState: .Normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        btn.sizeToFit()
        
        self.init(customView : btn)
    }
}
